#ifndef NEWFRIENDWIDGET_H
#define NEWFRIENDWIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QDateTime>
#include "./entities/constants.h"

namespace Ui {
class NewFriendWidget;
}

class NewFriendWidget : public QWidget
{
    Q_OBJECT

public:
    explicit NewFriendWidget(const QString& friendId, const QString& nickname, const QString& verifyInfo,
                             const QDateTime& applyTime, const int& id,
                             const QString& alias, const FriendVerifyStatus& status, QWidget *parent = nullptr);
    ~NewFriendWidget();
    QPushButton* getBtnCheck();

    QString getFriendId() const;
    QString getNickname() const;
    QString getVerifyInfo() const;
    int getId() const;

    void setStatus(const FriendVerifyStatus& status);

private:
    Ui::NewFriendWidget *ui;
    QString m_friendId;
    QString m_nickname;
    QString m_verifyInfo;
    QDateTime m_applyTime;
    int m_id;
    // 这两个字段后面加的
    QString m_alias;
    FriendVerifyStatus m_status;   // 0代表未审核 1代表同意 2代表拒绝

    // 初始化UI
    void initUI();

    // 更新UI
    void refreshUI();
};

#endif // NEWFRIENDWIDGET_H
